<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    h2{
        width:100px;
        height:100px;
        background: tomato;
    }
</style>
<body>
<h2>事件对象作用</h2>
<script type="text/javascript">
 var hh=document.getElementsByTagName('h2')[0];
    hh.onclick=function(evt){
        console.log(evt.clientX+"------"+evt.clientY);
        console.log(evt.pageX+"------"+evt.pageY);
    }
</script>
</body>
</html>